<?php
	echo 'your ip address is '.$USER_IP_ADDR = $_SERVER['REMOTE_ADDR'];
	echo "<br>";
	
	if (! empty($_SERVER['HTTP_X_FORWARDED_FOR']))
        {
            //存在的話將HTTP_X_FORWARDED_FOR拆解取出第一個IP即可
            $proxy_ip = split(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
            $X_FORWARD_IP = $proxy_ip[0];
			
			echo 'your proxy ip is '.$X_FORWARD_IP;
        } 
?>